//2009/08/22 01:22:01
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class BinaryIncrementation
{
public:
    string plusOne(string x)
    {
		char flag = '1';
		for(int i=x.size()-1; i>=0; i--)
		{
			x[i] = x[i] + flag - '0';
			if(x[i] > '1')
			{
				x[i] = '0';
				flag = '1';
			}
			else flag = '0';
		}
		if(flag == '1') return flag + x;
		return x;
    }
};
